package ch.bfh.java.directorysynchronizer.presentation.actionlisteners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

import ch.bfh.java.directorysynchronizer.presentation.items.Workbench;

public class StopSynchronizeButtonListener implements ActionListener
{

	private Workbench workbench;

	public StopSynchronizeButtonListener(Workbench wb)
	{

		this.workbench = wb;

	}

	@Override
	public void actionPerformed(ActionEvent e)
	{


		workbench.getSynchronizer().stop();
		
		JOptionPane.showMessageDialog(null, "Synchronisation not completed! \n"
		        + "for more information check the logfile");
	}

}
